import { Component, OnInit } from '@angular/core';
import { DataService } from 'src/app/service/data.service';

@Component({
  selector: 'app-history',
  templateUrl: './history.component.html',
  styleUrls: ['./history.component.css']
})
export class HistoryComponent implements OnInit {
  title = '历史记录'
  windowHeight:number = window.innerHeight
  contentHeight:number
  public menu = []
  constructor(private dataService:DataService) { }

  ngOnInit(): void {
    let that = this
    this.contentHeight = this.windowHeight - 40
    this.dataService.getDishes('history', dishes => that.menu = dishes)
  }
}
